home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / eigen.doc < prev    next >
Text File  |  1995-03-31  |  1KB  |  36 lines

  1. (User.programs) 
  2. Item: 213 by _tasmith at hpcvbbs.UUCP 
  3. Author: [Ted A Smith] 
  4.   Subj: Eigenvalue/Eigenvector decomposition 
  5.   Keyw: eigenvalues eigenvectors functions of a matrix 
  6.   Date: Wed Feb 06 1991 22:09 
  7.  
  8.  
  9. Here is a quick and dirty eigenvalue/eigenvector decomposition for real 
  10.   symetric matricies. 
  11.  
  12. I used the Jacobi method. 
  13.  
  14. The termination test is a hack (I just test to see if the eigenvector matrix 
  15.   has changed in a given pass!) I don't have any idea if there is a possibility 
  16.   of non-termination. 
  17.  
  18. Eigen takes a real symetric matrix in level 1 and returns the matrix of 
  19.   eigenvectors in level 2 and the eigenvalues are along the diagonal of the 
  20.   matrix in level 1.  (The offdiagonal values should be small in relation to 
  21.   the diagonal values.) 
  22.  
  23. EClr can be used to 0 the offdiagonal values. 
  24.  
  25. EFun takes a real symetric matrix (M) in level 2 and a function of 1 real arg 
  26.   (F) in level 1 and returns F(M) in level 1. 
  27.  
  28. For example in analogy with 'SIN(x)^2+COS(x)^2==1': 
  29.   [[ 1 2 3 ] [ 2 4 5 ] [ 3 5 6 ]] 
  30.   DUP  \<< SIN \>> EFun DUP * 
  31.   OVER \<< COS \>> EFun DUP * + 
  32.  
  33.   [[ .999999999981 9.89E-12 -1.881E-11 ] 
  34.    [ 1.188E-11 .999999999959 -3.3E-12 ] 
  35.    [ -1.801E-11 -2.3E-12 .999999999962 ]] 
  36.